package com.star.es.service;

import org.elasticsearch.action.search.SearchResponse;

import com.star.es.entity.QueryParam;

/**
 * 全文检索
 * @author Administrator
 *
 */
public interface FullTextQuery {
	
	/**
	 * 单字段查询
	 * @param queryParam
	 * @return
	 */
	SearchResponse matchQuery(QueryParam queryParam);
	
	/**
	 * 多字段查询
	 * 多个字段的field用逗号隔开作为map的key
	 * @param queryParam
	 * @return
	 */
	SearchResponse multiMatchQuery(QueryParam queryParam);
	
	/**
	 * 常用词查询
	 * 查询中忽略停用词，提高查询准确率
	 * @param queryParam
	 * @return
	 */
	SearchResponse commonTermsQuery(QueryParam queryParam);
	
	/**
	 * 字符串语法查询
	 * 支持Lucene查询语法，且必须是Lucene语法的字符串
	 * @param queryParam
	 * @return
	 */
	SearchResponse queryStringQuery(QueryParam queryParam);
	
	/**
	 * 
	 * @param queryParam
	 * @return
	 */
	SearchResponse simpleQueryString(QueryParam queryParam);

}






















